import { createApp } from 'vue'
import App from './App.vue'
import * as Icons from '@element-plus/icons-vue' // 引入所有图标，并命名为 Icons
import router from "./router/index.js";

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

const app = createApp(App)
app.use(router)

app.use(ElementPlus)

//将所有图标导入
for (let i in Icons) {
  app.component(i, Icons[i])
}

app.mount('#app')

// 下面这几段，不知道有什么用。少了不会不运行
// const ElementPlusIconsVue = require('@element-plus/icons-vue');
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//   App.component(key, component);
// }

